﻿using Abp.Domain.Entities.Auditing;
using SingleUserMall.Orders;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static SingleUserMall.Commissions.Commission;

namespace SingleUserMall.Authorization.Users
{
    /// <summary>
    /// 用户佣金
    /// </summary>
    public class UserCommission : FullAuditedEntity<long>
    {
        /// <summary>
        /// 佣金用户id
        /// </summary>
        public long UserId { get; set; }
        [ForeignKey("UserId")]
        public virtual User User { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 商品图片
        /// </summary>
        public string Pciture { get; set; }

        /// <summary>
        /// 佣金金额及分红金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 订单用户id
        /// </summary>
        public long FromUserId { get; set; }
        /// <summary>
        /// 佣金类型
        /// </summary>
        public CommissionType CommissionType { get; set; }
    }
}
